// 按需引用 1
import * as echarts from 'echarts/lib/echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/pie'
import 'echarts/lib/chart/line'
import 'echarts/lib/chart/gauge'
import 'echarts/lib/chart/boxplot'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/grid'
import 'echarts/lib/component/toolbox'
import 'echarts/lib/component/title'
import 'echarts/lib/component/dataZoomInside'
import 'echarts/lib/component/markLine'
import 'echarts/lib/component/dataZoom'
// import 'echarts/lib/component/visualMap'
// import 'echarts/lib/component/visualMapContinuous'
import { MapChart } from 'echarts/charts'

// // 按需引用 2
// import * as echarts from 'echarts/core';
// import { BarChart, PieChart, LineChart, GaugeChart, BoxplotChart } from 'echarts/charts';

// // 引入提示框，标题，直角坐标系，数据集，内置数据转换器组件，组件后缀都为 Component
// import {
//     TitleComponent,
//     LegendComponent,
//     TooltipComponent,
//     GridComponent,
//     ToolboxComponent,
//     DatasetComponent,
//     TransformComponent
// } from 'echarts/components';

// // 标签自动布局，全局过渡动画等特性
// import { LabelLayout, UniversalTransition } from 'echarts/features';
// import { CanvasRenderer } from 'echarts/renderers';

// // 注册必须的组件
// echarts.use([
//     BarChart,
//     PieChart,
//     LineChart,
//     GaugeChart,
//     BoxplotChart,
//     // ScatterChart,

//     TitleComponent,
//     LegendComponent,
//     TooltipComponent,
//     GridComponent,
//     ToolboxComponent,
//     DatasetComponent,
//     TransformComponent,
//     LabelLayout,
//     UniversalTransition,
//     CanvasRenderer
// ]);

echarts.use([MapChart])

export default echarts
